#include "bsp_mc_dac.h"




void Dac_init(void)
{

	RCC_APB1PeriphClockCmd( RCC_APB1Periph_DAC, ENABLE );
	DAC_InitTypeDef dac_init;

	dac_init.DAC_Trigger = DAC_Trigger_None;
    dac_init.DAC_WaveGeneration = DAC_WaveGeneration_None;
    dac_init.DAC_LFSRUnmask_TriangleAmplitude = DAC_LFSRUnmask_Bit0;
    dac_init.DAC_OutputBuffer = DAC_OutputBuffer_Disable;
    DAC_Init(DAC_Channel_1, &dac_init);
	DAC_Cmd(DAC_Channel_1, ENABLE);
//	DAC_SoftwareTriggerCmd(DAC_Channel_1,ENABLE);
}


